/**
 * 
 *  @project Air Traff Monitor
 * 
 *  @author M.Emre ATASEVER <m.emre.atas@gmail.com>
 *  @author M.Burak ALKAN <mburakalkan@gmail.com>
 *  @author H.Burak KARAMIK <bkaramik@gmail.com>
 *
 *	`Air Traffic Monitor' is distributed in the hope that it will be useful,
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *	GNU General Public License for more details.
 *
 *	You should have received a copy of the GNU General Public License
 *	along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef  NETMODEL_INC
#define  NETMODEL_INC

#include <QAbstractItemModel>

#include "kisock.h"
#include "netitem.h"
#include "kismodel.h"

class NetworkModel : public KismetDataModel<NetworkRootItem, NetworkItem>
{
	Q_OBJECT
public:
		NetworkModel(QKismetSocket *sock);

		QVariant data(const QModelIndex &index, int role) const;
		QVariant headerData(int section, Qt::Orientation orientation,int role = Qt::DisplayRole) const;

		QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
		QModelIndex parent(const QModelIndex &index) const;
		int columnCount(const QModelIndex &parent = QModelIndex()) const;
		int rowCount(const QModelIndex &parent = QModelIndex()) const;

public slots:
		void netInfo(networkInfo info);
		void cliInfo(clientInfo info);
private:
		NetworkItem	*findItem(QString &bssid);
		
};

#endif
